package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.domain.entity.system.BoatLocationInfo;
import com.ruoyi.system.mapper.BoatLocationInfoMapper;
import com.ruoyi.system.service.IBoatLocationInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 船舶位置信息Service业务层处理
 *
 * @author zjw
 * @date 2024-01-24
 */
@Service
public class BoatLocationInfoServiceImpl implements IBoatLocationInfoService {
    @Resource
    private BoatLocationInfoMapper boatLocationInfoMapper;

    /**
     * 查询船舶位置信息
     *
     * @param id 船舶位置信息主键
     * @return 船舶位置信息
     */
    @Override
    public BoatLocationInfo selectBoatLocationInfoById(Long id) {
        return boatLocationInfoMapper.selectBoatLocationInfoById(id);
    }

    /**
     * 查询船舶位置信息列表
     *
     * @param boatLocationInfo 船舶位置信息
     * @return 船舶位置信息
     */
    @Override
    public List<BoatLocationInfo> selectBoatLocationInfoList(BoatLocationInfo boatLocationInfo) {
        return boatLocationInfoMapper.selectBoatLocationInfoList(boatLocationInfo);
    }

    /**
     * 新增船舶位置信息
     *
     * @param boatLocationInfo 船舶位置信息
     * @return 结果
     */
    @Override
    public int insertBoatLocationInfo(BoatLocationInfo boatLocationInfo) {
//        boatLocationInfo.setCreateTime(DateUtils.getNowDate());
        return boatLocationInfoMapper.insertBoatLocationInfo(boatLocationInfo);
    }

    /**
     * 修改船舶位置信息
     *
     * @param boatLocationInfo 船舶位置信息
     * @return 结果
     */
    @Override
    public int updateBoatLocationInfo(BoatLocationInfo boatLocationInfo) {
        return boatLocationInfoMapper.updateBoatLocationInfo(boatLocationInfo);
    }

    /**
     * 批量删除船舶位置信息
     *
     * @param ids 需要删除的船舶位置信息主键
     * @return 结果
     */
    @Override
    public int deleteBoatLocationInfoByIds(Long[] ids) {
        return boatLocationInfoMapper.deleteBoatLocationInfoByIds(ids);
    }

    /**
     * 删除船舶位置信息信息
     *
     * @param id 船舶位置信息主键
     * @return 结果
     */
    @Override
    public int deleteBoatLocationInfoById(Long id) {
        return boatLocationInfoMapper.deleteBoatLocationInfoById(id);
    }
}
